﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HuaHan.WorkTicket.Domain
{
    public abstract class BaseEntity
    {

        public BaseEntity()
        {
            this.CreatedAt = DateTime.Now;
            this.UpdatedAt = DateTime.Now;
            this.IsValid = true;
            this.IsDeleted = false;
        }

        [DisplayName("是否启用")]
        public bool IsValid
        {
            get;
            set;
        }

        public bool IsDeleted
        {
            get;
            set;
        }

        [MaxLength(100)]
        [DisplayName("备注")]
        public string Remark
        {
            get;
            set;
        }

        public DateTime CreatedAt
        {
            get;
            protected set;
        }

        [MaxLength(20)]
        public string CreatedBy
        {
            get;
            set;
        }

        public DateTime  UpdatedAt
        {
            get;
            set;
        }

        [MaxLength(20)]
        public string UpdatedBy
        {
            get;
            set;
        }
    }
}
